<%--
  Created by IntelliJ IDEA.
  author: Jsonor
  date: 2018/4/25 17:04
  description: Description
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
  <title>Title</title>
  <style>
    #nav{
      width:100%;
      height:30px;
      right:0;top:0;
    }
    li{
      list-style: none;
    }
  </style>
</head>
<body>
<div id="nav"  style="position: absolute; z-index: 3;">
  <header id="header" class="logo-classic-centered headerPM menuPositionHolder" role="banner">
  <c:choose>
    <c:when test="${empty user}">
      <li id="headerLogin" class="headerLogin" style="display: list-item;">
      <a href="${pageContext.request.contextPath}/backstage/backstageLogin.do" style="position: absolute;right:128px; top: 10px;">管理员身份登录|</a>
      </li>
      <li id="headerLogin" class="headerLogin" style="display: list-item;">
        <a href="${pageContext.request.contextPath}/user/login.do" style="position: absolute;right:90px; top: 10px;">登录|</a>
      </li>
      <li id="headerRegister" class="headerRegister" style="display: list-item;">
        <a href="${pageContext.request.contextPath}/user/register.do" style="position: absolute;right:55px;top: 10px;">注册</a>
      </li>
    </c:when>
    <c:otherwise>
      <li id="headerLogin" class="headerLogin" style="display: list-item;position: absolute;right: 450px;top: 10px;">
          ${user.username}|
      </li>
      <li id="headerRegister" class="headerRegister" style="display: list-item;">
        <a href="${pageContext.request.contextPath}/product/addProduct.do" style="position: absolute;right: 375px;top: 8px;">上传照片|</a>
      </li>
      <li id="headerRegister" class="headerRegister" style="display: list-item;">
        <a href="${pageContext.request.contextPath}/product/productAll.do" style="position: absolute;right: 300px;top: 8px;">我的照片|</a>
      </li>
      <li id="headerRegister" class="headerRegister" style="display: list-item;">
        <a href="${pageContext.request.contextPath}/product/showComment.do" style="position: absolute;right: 242px;top: 8px;">菜鸟圈|</a>
      </li>
      <li id="headerRegister" class="headerRegister" style="display: list-item;">
        <a href="${pageContext.request.contextPath}/user/logout.do" style="position: absolute;right: 135px;top: 8px;">退出</a>
      </li>
      <li id="headerRegister" class="headerRegister" style="display: list-item;">
        <a href="${pageContext.request.contextPath}/user/updateinformation.do" style="position: absolute;right: 170px;top: 8px;">资料修改|</a>
      </li>
    </c:otherwise>
  </c:choose>
</div>
</body>
</html>
